<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Multifit algorithm</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Multifit_algorithm"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Multifit_algorithm rootpage-Multifit_algorithm skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Multifit algorithm</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<p>The <b>multifit algorithm</b> is an algorithm for <a href="Multiway_number_partitioning" title="Multiway number partitioning">multiway number partitioning</a>, originally developed for the problem of <a href="Identical-machines_scheduling" title="Identical-machines scheduling">identical-machines scheduling</a>. It was developed by Coffman, Garey and Johnson.<sup id="cite_ref-:0_1-0" class="reference"><a href="#cite_note-:0-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> Its novelty comes from the fact that it uses an algorithm for another famous problem - the <a href="Bin_packing_problem" title="Bin packing problem">bin packing problem</a> - as a subroutine.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="The_algorithm">The algorithm</h2></div>
<p>The input to the algorithm is a set <i>S</i> of numbers, and a parameter <i>n</i>. The required output is a partition of <i>S</i> into <i>n</i> subsets, such that the largest subset sum (also called the <b>makespan</b>) is as small as possible.
</p><p>The algorithm uses as a subroutine, an algorithm called <i><a href="First-fit-decreasing_bin_packing" title="First-fit-decreasing bin packing">first-fit-decreasing bin packing</a></i> (FFD). The FFD algorithm takes as input the same set <i>S</i> of numbers, and a bin-capacity <i>c</i>. It heuristically packs numbers into bins such that the sum of numbers in each bin is at most <i>C</i>, aiming to use as few bins as possible. Multifit runs FFD multiple times, each time with a different capacity <i>C</i>, until it finds some <i>C</i> such that FFD with capacity <i>C</i> packs <i>S</i> into at most <i>n</i> bins. To find it, it uses <a href="Binary_search" title="Binary search">binary search</a> as follows.
</p>
<ol><li>Let <i>L</i> := max ( sum(<i>S</i>) / <i>n</i>, max(<i>S</i>) ). Note, with bin-capacity smaller than <i>L</i>, every packing must use more than <i>n</i> bins.</li>
<li>Let <i>U</i> := max ( 2 sum(<i>S</i>) / <i>n</i>, max(<i>S</i>) ). Note, with bin-capacity at least <i>U</i>, FFD uses at most <i>n</i> bins. <i>Proof</i>: suppose by contradiction that some input <i>s<sub>i</sub></i> did not fit into any of the first <i>n</i> bins. Clearly this is possible only if <i>i</i> ≥ <i>n</i>+1. If <i>s<sub>i</sub></i> <i>></i> C/2, then, since the inputs are ordered in descending order, the same inequality holds for all the first <i>n</i>+1 inputs in <i>S</i>. This means that sum(S) > (n+1)<i>C</i>/2 > <i>n</i> <i>U</i>/2, a contradiction to the definition of <i>U</i>. Otherwise, <i>s<sub>i</sub></i> ≤ C/2. So the sum of each of the first <i>n</i> bins is more than C/2. This again implies sum(S) > n <i>C</i>/2 > <i>n</i> <i>U</i>/2, contradiction.</li>
<li>Iterate <i>k</i> times (where <i>k</i> is a precision parameter):
<ul><li>Let <i>C</i> := (<i>L</i>+<i>U</i>)/2. Run FFD on <i>S</i> with capacity <i>C</i>.
<ul><li>If FFD needs at most <i>n</i> bins, then decrease <i>U</i> by letting <i>U</i> := <i>C</i>.</li>
<li>If FFD needs more than <i>n</i> bins, then increase L by letting <i>L</i> := <i>C.</i></li></ul></li></ul></li>
<li>Finally, run FFD with capacity <i>U</i>. It is guaranteed to use at most <i>n</i> bins. Return the resulting scheduling.</li></ol>
<div class="mw-heading mw-heading2"><h2 id="Performance">Performance</h2></div>
<p>Multifit is a <a href="Constant_factor_approximation_algorithm" class="mw-redirect" title="Constant factor approximation algorithm">constant-factor approximation algorithm</a>. It always finds a partition in which the makespan is at most a constant factor larger than the optimal makespan. To find this constant, we must first analyze FFD. While the standard analysis of <a href="First-fit-decreasing_bin_packing" title="First-fit-decreasing bin packing">FFD</a> considers approximation w.r.t. <i>number of bins</i> when the capacity is constant, here we need to analyze approximation w.r.t. <i>capacity</i> when the number of bins is constant. Formally, for every input size S and integer n, let <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle OPT(S,n)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>O</mi>
<mi>P</mi>
<mi>T</mi>
<mo stretchy="false">(</mo>
<mi>S</mi>
<mo>,</mo>
<mi>n</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle OPT(S,n)}</annotation>
</semantics>
</math></span><img src="./c023058e8c95d3b68b3dffc4ec65293a44917e70.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.892ex; height:2.843ex;" alt="{\displaystyle OPT(S,n)}" loading="lazy"></span> be the smallest capacity such that <i>S</i> can be packed into <i>n</i> bins of this capacity. Note that <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle OPT(S,n)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>O</mi>
<mi>P</mi>
<mi>T</mi>
<mo stretchy="false">(</mo>
<mi>S</mi>
<mo>,</mo>
<mi>n</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle OPT(S,n)}</annotation>
</semantics>
</math></span><img src="./c023058e8c95d3b68b3dffc4ec65293a44917e70.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.892ex; height:2.843ex;" alt="{\displaystyle OPT(S,n)}" loading="lazy"></span> is the value of the optimal solution to the original scheduling instance.
</p><p>Let <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r_{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r_{n}}</annotation>
</semantics>
</math></span><img src="./57784cdf7f49f2c46baad4eb7b6a7d5c14eb5fa4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.267ex; height:2.009ex;" alt="{\displaystyle r_{n}}" loading="lazy"></span> be the smallest real number such that, for every input <i>S</i>, FFD with capacity <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r_{n}\cdot OPT(S,n)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>⋅<!-- ⋅ --></mo>
<mi>O</mi>
<mi>P</mi>
<mi>T</mi>
<mo stretchy="false">(</mo>
<mi>S</mi>
<mo>,</mo>
<mi>n</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r_{n}\cdot OPT(S,n)}</annotation>
</semantics>
</math></span><img src="./adcce81a5815e5f5f72b61ad1f7fe5ac69ee542b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:14.838ex; height:2.843ex;" alt="{\displaystyle r_{n}\cdot OPT(S,n)}" loading="lazy"></span> uses at most <i>n</i> bins.
</p>
<div class="mw-heading mw-heading3"><h3 id="Upper_bounds">Upper bounds</h3></div>
<p>Coffman, Garey and Johnson prove the following upper bounds on <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r_{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r_{n}}</annotation>
</semantics>
</math></span><img src="./57784cdf7f49f2c46baad4eb7b6a7d5c14eb5fa4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.267ex; height:2.009ex;" alt="{\displaystyle r_{n}}" loading="lazy"></span>:<sup id="cite_ref-:0_1-1" class="reference"><a href="#cite_note-:0-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p>
<ul><li><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r_{n}\leq 8/7\approx 1.14}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>≤<!-- ≤ --></mo>
<mn>8</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>7</mn>
<mo>≈<!-- ≈ --></mo>
<mn>1.14</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r_{n}\leq 8/7\approx 1.14}</annotation>
</semantics>
</math></span><img src="./387485f41cfb4425393a7fdcc40292d2a46debca.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.086ex; height:2.843ex;" alt="{\displaystyle r_{n}\leq 8/7\approx 1.14}" loading="lazy"></span> for <i>n</i> = 2;</li>
<li><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r_{n}\leq 15/13\approx 1.15}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>≤<!-- ≤ --></mo>
<mn>15</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>13</mn>
<mo>≈<!-- ≈ --></mo>
<mn>1.15</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r_{n}\leq 15/13\approx 1.15}</annotation>
</semantics>
</math></span><img src="./5f471b8b06b08ec77fe92645351bc793e0648d5b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.411ex; height:2.843ex;" alt="{\displaystyle r_{n}\leq 15/13\approx 1.15}" loading="lazy"></span> for <i>n</i> = 3;</li>
<li><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r_{n}\leq 20/17\approx 1.176}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>≤<!-- ≤ --></mo>
<mn>20</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>17</mn>
<mo>≈<!-- ≈ --></mo>
<mn>1.176</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r_{n}\leq 20/17\approx 1.176}</annotation>
</semantics>
</math></span><img src="./1288f0420aa4dfd9abd63ca3c85aa540d437449d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.573ex; height:2.843ex;" alt="{\displaystyle r_{n}\leq 20/17\approx 1.176}" loading="lazy"></span> for <i>n</i> = 4,5,6,7;</li>
<li><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r_{n}\leq 122/100=1.22}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>≤<!-- ≤ --></mo>
<mn>122</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>100</mn>
<mo>=</mo>
<mn>1.22</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r_{n}\leq 122/100=1.22}</annotation>
</semantics>
</math></span><img src="./bae6178abcb9d76709f734be58cb0131d633c817.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:20.735ex; height:2.843ex;" alt="{\displaystyle r_{n}\leq 122/100=1.22}" loading="lazy"></span> for all <i>n</i> ≥ 8.</li></ul>
<p>During the MultiFit algorithm, the lower bound <i>L</i> is always a capacity for which it is impossible to pack <i>S</i> into <i>n</i> bins. Therefore, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle L<r_{n}\cdot OPT(S,n)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>L</mi>
<mo><</mo>
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>⋅<!-- ⋅ --></mo>
<mi>O</mi>
<mi>P</mi>
<mi>T</mi>
<mo stretchy="false">(</mo>
<mi>S</mi>
<mo>,</mo>
<mi>n</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle L<r_{n}\cdot OPT(S,n)}</annotation>
</semantics>
</math></span><img src="./b8ad9047c9308406f3614c2aff638f691b8cdb3e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.52ex; height:2.843ex;" alt="{\displaystyle L<r_{n}\cdot OPT(S,n)}" loading="lazy"></span>. Initially, the difference <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle U-L}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>U</mi>
<mo>−<!-- − --></mo>
<mi>L</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle U-L}</annotation>
</semantics>
</math></span><img src="./998f89a79b7c2fc4cd1e14133e68cb7226b1502f.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:6.206ex; height:2.343ex;" alt="{\displaystyle U-L}" loading="lazy"></span> is at most sum(<i>S</i>) / <i>n</i>, which is at most <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle OPT(S,n)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>O</mi>
<mi>P</mi>
<mi>T</mi>
<mo stretchy="false">(</mo>
<mi>S</mi>
<mo>,</mo>
<mi>n</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle OPT(S,n)}</annotation>
</semantics>
</math></span><img src="./c023058e8c95d3b68b3dffc4ec65293a44917e70.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.892ex; height:2.843ex;" alt="{\displaystyle OPT(S,n)}" loading="lazy"></span>. After the MultiFit algorithm runs for <i>k</i> iterations, the difference shrinks <i>k</i> times by half, so <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle U-L\leq (1/2)^{k}\cdot OPT(S,n)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>U</mi>
<mo>−<!-- − --></mo>
<mi>L</mi>
<mo>≤<!-- ≤ --></mo>
<mo stretchy="false">(</mo>
<mn>1</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>2</mn>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
<mo>⋅<!-- ⋅ --></mo>
<mi>O</mi>
<mi>P</mi>
<mi>T</mi>
<mo stretchy="false">(</mo>
<mi>S</mi>
<mo>,</mo>
<mi>n</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle U-L\leq (1/2)^{k}\cdot OPT(S,n)}</annotation>
</semantics>
</math></span><img src="./3b185e5213b4c4b8015115733948d5b9addd100d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:28.261ex; height:3.176ex;" alt="{\displaystyle U-L\leq (1/2)^{k}\cdot OPT(S,n)}" loading="lazy"></span>. Therefore, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle U\leq (r_{n}+(1/2)^{k})\cdot OPT(S,n)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>U</mi>
<mo>≤<!-- ≤ --></mo>
<mo stretchy="false">(</mo>
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>+</mo>
<mo stretchy="false">(</mo>
<mn>1</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>2</mn>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
<mo stretchy="false">)</mo>
<mo>⋅<!-- ⋅ --></mo>
<mi>O</mi>
<mi>P</mi>
<mi>T</mi>
<mo stretchy="false">(</mo>
<mi>S</mi>
<mo>,</mo>
<mi>n</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle U\leq (r_{n}+(1/2)^{k})\cdot OPT(S,n)}</annotation>
</semantics>
</math></span><img src="./f97eab3e90c68a7569a6369ea6cd1571db10f6a7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:30.755ex; height:3.176ex;" alt="{\displaystyle U\leq (r_{n}+(1/2)^{k})\cdot OPT(S,n)}" loading="lazy"></span>. Therefore, the scheduling returned by MultiFit has makespan at most <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r_{n}+(1/2)^{k}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>+</mo>
<mo stretchy="false">(</mo>
<mn>1</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>2</mn>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r_{n}+(1/2)^{k}}</annotation>
</semantics>
</math></span><img src="./9a3caed90a823c23bec8a93fded8c5cc4d7ca959.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.493ex; height:3.176ex;" alt="{\displaystyle r_{n}+(1/2)^{k}}" loading="lazy"></span> times the optimal makespan. When <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k}</annotation>
</semantics>
</math></span><img src="./c3c9a2c7b599b37105512c5d570edc034056dd40.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.211ex; height:2.176ex;" alt="{\displaystyle k}" loading="lazy"></span> is sufficiently large, the approximation factor of MultiFit can be made arbitrarily close to <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r_{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r_{n}}</annotation>
</semantics>
</math></span><img src="./57784cdf7f49f2c46baad4eb7b6a7d5c14eb5fa4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.267ex; height:2.009ex;" alt="{\displaystyle r_{n}}" loading="lazy"></span>, which is at most <b>1.22</b>.
</p><p>Later papers performed a more detailed analysis of MultiFit, and proved that its approximation ratio is at most 6/5=<b>1.2</b>,<sup id="cite_ref-:1_2-0" class="reference"><a href="#cite_note-:1-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> and later, at most 13/11≈<b>1.182</b>.<sup id="cite_ref-:2_3-0" class="reference"><a href="#cite_note-:2-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> The original proof of this missed some cases; <sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> presented a complete and simpler proof. The 13/11 cannot be improved: see lower bound below.<sup id="cite_ref-:1_2-1" class="reference"><a href="#cite_note-:1-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Lower_bounds">Lower bounds</h3></div>
<p><b>For <i>n</i>=4</b>: the following<sup id="cite_ref-:3_5-0" class="reference"><a href="#cite_note-:3-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> shows that <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r_{n}\geq 20/17}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>≥<!-- ≥ --></mo>
<mn>20</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>17</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r_{n}\geq 20/17}</annotation>
</semantics>
</math></span><img src="./b7bdfe17c5d1d2a7403a8896e469d327b0e185be.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.178ex; height:2.843ex;" alt="{\displaystyle r_{n}\geq 20/17}" loading="lazy"></span>, which is tight. The inputs are 9,7,6,5,5, 4,4,4,4,4,4,4,4,4. They can be packed into 4 bins of capacity 17 as follows:
</p>
<ul><li>9, 4, 4</li>
<li>7, 6, 4</li>
<li>5, 4, 4, 4</li>
<li>5, 4, 4, 4</li></ul>
<p>But if we run FFD with bin capacity smaller than 20, then the filled bins are:
</p>
<ul><li>9,7 [4 does not fit]</li>
<li>6,5,5 [4 does not fit]</li>
<li>4,4,4,4 [4 does not fit]</li>
<li>4,4,4,4</li>
<li>4</li></ul>
<p>Note that the sum in each of the first 4 bins is 16, so we cannot put another 4 inside it. Therefore, 4 bins are not sufficient.
</p><p><b>For <i>n</i>=13</b>: the following<sup id="cite_ref-:1_2-2" class="reference"><a href="#cite_note-:1-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> shows that <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r_{n}\geq 13/11}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>≥<!-- ≥ --></mo>
<mn>13</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>11</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r_{n}\geq 13/11}</annotation>
</semantics>
</math></span><img src="./62ca9c519e8eee5b201c0048c0636f144e3f6264.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.178ex; height:2.843ex;" alt="{\displaystyle r_{n}\geq 13/11}" loading="lazy"></span>, which is tight. The inputs can be packed into 13 bins of capacity 66 as follows:
</p>
<ul><li>40,13,13 {8 times}</li>
<li>25,25,16 {3 times}</li>
<li>25,24,17 {2 times}</li></ul>
<p>But if we run FFD with bin capacity smaller than 66*13/11 = 78, then the filled bins are:
</p>
<ul><li>40,25 {8 times}</li>
<li>24, 24, 17</li>
<li>17, 16, 16, 16</li>
<li>13, 13, 13, 13, 13 {3 times}</li>
<li>13</li></ul>
<p>Note that the sum in each of the first 13 bins is 65, so we cannot put another 13 inside it. Therefore, 13 bins are not sufficient.
</p>
<div class="mw-heading mw-heading3"><h3 id="Performance_with_uniform_machines">Performance with uniform machines</h3></div>
<p>MultiFit can also be used in the more general setting called <a href="Uniform-machines_scheduling" title="Uniform-machines scheduling">uniform-machines scheduling</a>, where machines may have different processing speeds.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> When there are two uniform machines, the approximation factor is <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\sqrt {6}}/2}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<msqrt>
<mn>6</mn>
</msqrt>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>2</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\sqrt {6}}/2}</annotation>
</semantics>
</math></span><img src="./2c1656d1466734d59460fa63d718ab738c83b933.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.423ex; height:3.009ex;" alt="{\displaystyle {\sqrt {6}}/2}" loading="lazy"></span>. When MultiFit is combined with the <a href="LPT_algorithm" class="mw-redirect" title="LPT algorithm">LPT algorithm</a>, the ratio improves to <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\sqrt {2}}+1/2}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<msqrt>
<mn>2</mn>
</msqrt>
</mrow>
<mo>+</mo>
<mn>1</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>2</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\sqrt {2}}+1/2}</annotation>
</semantics>
</math></span><img src="./599d59288ea26f41ed76b0c1981b1b47e06d269a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.426ex; height:3.176ex;" alt="{\displaystyle {\sqrt {2}}+1/2}" loading="lazy"></span>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Performance_for_maximizing_the_smallest_sum">Performance for maximizing the smallest sum</h3></div><p>
A dual goal to minimizing the largest sum (makespan) is maximizing the smallest sum. Deuermeyer, Friesen and Langston claim that MultiFit does not have a good approximation factor for this problem:<sup id="cite_ref-:4_7-0" class="reference"><a href="#cite_note-:4-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup></p><blockquote><p>"In the solution of the makespan problem using MULTIFIT, it is easy to construct examples where one processor is never used. Such a solution is tolerable for the makespan problem, but is totally unacceptable for our problem <sub>[since the smallest sum is 0]</sub>. Modifications of MULTIFIT can be devised which would be more suitable for our problem, but we could find none which produces a better worst-case bound than that of <a href="Longest-processing-time-first_scheduling" title="Longest-processing-time-first scheduling">LPT</a>."</p></blockquote>
<div class="mw-heading mw-heading2"><h2 id="Proof_idea">Proof idea</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Minimal_counterexamples">Minimal counterexamples</h3></div>
<p>The upper bounds on <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r_{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r_{n}}</annotation>
</semantics>
</math></span><img src="./57784cdf7f49f2c46baad4eb7b6a7d5c14eb5fa4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.267ex; height:2.009ex;" alt="{\displaystyle r_{n}}" loading="lazy"></span> are proved by contradiction. For any integers <i>p</i> ≥ <i>q,</i> if <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r_{n}>p/q}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>></mo>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>q</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r_{n}>p/q}</annotation>
</semantics>
</math></span><img src="./8ac515f02b778a5cc08b35b0075e9ed346cc6901.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.767ex; height:2.843ex;" alt="{\displaystyle r_{n}>p/q}" loading="lazy"></span>, then there exists a (<i>p</i>/<i>q</i>)-counterexample, defined as an instance <i>S</i> and a number <i>n</i> of bins such that
</p>
<ul><li><i>S</i> can be packed into <i>n</i> bins with capacity <i>q</i>;</li>
<li>FFD does <i>not</i> manage to pack <i>S</i> into <i>n</i> bins with capacity <i>p</i>.</li></ul>
<p>If there exists such a counterexample, then there also exists a <i>minimal (p/q)-counterexample</i>, which is a (<i>p</i>/<i>q</i>)-counterexample with a smallest number of items in <i>S</i> and a smallest number of bins <i>n</i>. In a minimal <i>(p/q)</i>-counterexample, FFD packs all items in <i>S</i> except the last (smallest) one into <i>n</i> bins with capacity <i>p</i>. Given a minimal <i>(p/q)</i>-counterexample, denote by P<sub>1</sub>,...,P<sub><i>n</i></sub> the (incomplete) FFD packing into these <i>n</i> bins with capacity <i>p</i>, by P<sub><i>n+1</i></sub> the bin containing the single smallest item, and by Q<sub>1</sub>,...,Q<sub><i>n</i></sub> the (complete) optimal packing into <i>n</i> bins with capacity <i>q</i>. The following lemmas can be proved:
</p>
<ul><li>No union of <i>k</i> subsets from {Q<sub>1,...,</sub>Q<sub>n</sub>} is dominated by a union of <i>k</i> subsets from {P<sub>1,...,</sub>P<sub>n+1</sub>} ("dominated" means that each item in the dominated subset is mapped to a weakly-larger item in the dominating subset). Otherwise we could get a smaller counterexample as follows. [1] Delete all items in the P<sub><i>i</i></sub>. Clearly, the incomplete FFD packing now needs <i>n</i>-<i>k</i> bins, and still the smallest item (or an entire bin) remains unpacked. [2] In the optimal packing Q<i><sub>i</sub></i>, exchange each item with its dominating item. Now, the <i>k</i> subsets Q<sub><i>i</i></sub> are larger (probably larger than <i>q</i>), but all other <i>n</i>-<i>k</i> subsets are smaller (in particular, at most <i>q</i>). Therefore, after deleting all items in the <i>P<sub>i</sub></i>, the remaining items can be packed into at most <i>n</i>-<i>k</i> bins of size <i>q</i>.</li>
<li>Each of Q<sub>1,...,</sub>Q<sub>n</sub> contains at least 3 items. Otherwise we had domination and, by the previous lemma, could get a smaller counterexample. This is because [a] each Q<sub><i>i</i></sub> with a single item is dominated by the P<sub><i>j</i></sub> that contains that item; [b] for each Q<sub><i>i</i></sub> with two items <i>x</i> and <i>y</i>, if both <i>x</i> and <i>y</i> are in the same P<sub><i>j</i></sub><i>,</i> then Q<sub><i>i</i></sub> is dominated by this P<sub><i>j</i></sub>; [c] Suppose x≥y, x is in some P<sub><i>j</i></sub><i>,</i> and y is in some P<sub><i>k</i></sub> to its right. This means that y did not fit into P<sub><i>j</i></sub>. But x+y ≤ q. This means that P<sub><i>j</i></sub> must contain some item z ≥ y. So Q<sub><i>i</i></sub> is dominated by P<sub><i>j</i></sub><i>.</i> [d] Suppose x≥y, x is in some P<sub><i>j</i></sub><i>,</i> and y is in some P<sub><i>k</i></sub> to its left. This means that there must be a previous item z ≥ x. So Q<sub><i>i</i></sub> is dominated by P<sub><i>k</i></sub><i>.</i></li>
<li>Each of P<sub>1,...,</sub>P<sub>n</sub> contains at least 2 items. This is because, if some P<sub><i>i</i></sub> contains only a single item, this implies that the last (smallest) item does not fit into it. This means that this single item must be alone in an optimal bundle, contradicting the previous lemma.</li>
<li>Let <i>s</i> be the size of the smallest item. Then <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle s>{\frac {n}{n-1}}(p-q)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>s</mi>
<mo>></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>n</mi>
<mrow>
<mi>n</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</mfrac>
</mrow>
<mo stretchy="false">(</mo>
<mi>p</mi>
<mo>−<!-- − --></mo>
<mi>q</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle s>{\frac {n}{n-1}}(p-q)}</annotation>
</semantics>
</math></span><img src="./032bd413ccd0a5f1a69b5debd62102cc37778c80.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.005ex; width:17.311ex; height:4.843ex;" alt="{\displaystyle s>{\frac {n}{n-1}}(p-q)}" loading="lazy"></span>. <i>Proof</i>: Since <i>s</i> does not fit into the first <i>n</i> bundles, we have <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle sum(P_{i})+s>p}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>s</mi>
<mi>u</mi>
<mi>m</mi>
<mo stretchy="false">(</mo>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo stretchy="false">)</mo>
<mo>+</mo>
<mi>s</mi>
<mo>></mo>
<mi>p</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle sum(P_{i})+s>p}</annotation>
</semantics>
</math></span><img src="./2686df8f635d070a2712f4c5ea1734b30134dcca.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.761ex; height:2.843ex;" alt="{\displaystyle sum(P_{i})+s>p}" loading="lazy"></span>, so <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{i=1}^{n}sum(P_{i})+n\cdot s>n\cdot p}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<munderover>
<mo>∑<!-- ∑ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
<mo>=</mo>
<mn>1</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</munderover>
<mi>s</mi>
<mi>u</mi>
<mi>m</mi>
<mo stretchy="false">(</mo>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo stretchy="false">)</mo>
<mo>+</mo>
<mi>n</mi>
<mo>⋅<!-- ⋅ --></mo>
<mi>s</mi>
<mo>></mo>
<mi>n</mi>
<mo>⋅<!-- ⋅ --></mo>
<mi>p</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \sum _{i=1}^{n}sum(P_{i})+n\cdot s>n\cdot p}</annotation>
</semantics>
</math></span><img src="./643d5e118b5f4ab36c9a28c2479047f6c6ef5891.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:26.65ex; height:6.843ex;" alt="{\displaystyle \sum _{i=1}^{n}sum(P_{i})+n\cdot s>n\cdot p}" loading="lazy"></span>. On the other hand, since all items fit into <i>n</i> bins of capacity <i>q</i>, we have <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{i=1}^{n}sum(P_{i})+s\leq n\cdot q}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<munderover>
<mo>∑<!-- ∑ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
<mo>=</mo>
<mn>1</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</munderover>
<mi>s</mi>
<mi>u</mi>
<mi>m</mi>
<mo stretchy="false">(</mo>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo stretchy="false">)</mo>
<mo>+</mo>
<mi>s</mi>
<mo>≤<!-- ≤ --></mo>
<mi>n</mi>
<mo>⋅<!-- ⋅ --></mo>
<mi>q</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \sum _{i=1}^{n}sum(P_{i})+s\leq n\cdot q}</annotation>
</semantics>
</math></span><img src="./2ceb988ed45ea0dd192dc4fcb12cce60947d8f45.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:23.477ex; height:6.843ex;" alt="{\displaystyle \sum _{i=1}^{n}sum(P_{i})+s\leq n\cdot q}" loading="lazy"></span>. Subtracting the inequalities gives <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle s>{\frac {n}{n-1}}(p-q)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>s</mi>
<mo>></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>n</mi>
<mrow>
<mi>n</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</mfrac>
</mrow>
<mo stretchy="false">(</mo>
<mi>p</mi>
<mo>−<!-- − --></mo>
<mi>q</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle s>{\frac {n}{n-1}}(p-q)}</annotation>
</semantics>
</math></span><img src="./032bd413ccd0a5f1a69b5debd62102cc37778c80.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.005ex; width:17.311ex; height:4.843ex;" alt="{\displaystyle s>{\frac {n}{n-1}}(p-q)}" loading="lazy"></span>.</li>
<li>The size of every item is at most <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle q-2s}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>q</mi>
<mo>−<!-- − --></mo>
<mn>2</mn>
<mi>s</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle q-2s}</annotation>
</semantics>
</math></span><img src="./33bdb706876351a045ca54376ee75a343dfa13de.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.163ex; height:2.509ex;" alt="{\displaystyle q-2s}" loading="lazy"></span>. This is because there are at least 3 items in each optimal bin (with capacity <i>q</i>).</li>
<li>The sum of items in every bin P<sub>1,...,</sub>P<sub>n</sub> is larger than <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p-s}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>p</mi>
<mo>−<!-- − --></mo>
<mi>s</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle p-s}</annotation>
</semantics>
</math></span><img src="./a83132e7db5dade59a46caad2eb21ca2a0eba088.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:5.19ex; height:2.343ex;" alt="{\displaystyle p-s}" loading="lazy"></span>; otherwise we could add the smallest item.</li></ul>
<div class="mw-heading mw-heading3"><h3 id="5/4_Upper_bound">5/4 Upper bound</h3></div>
<p>From the above lemmas, it is already possible to prove a loose upper bound <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r_{n}\leq 5/4=1.25}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>≤<!-- ≤ --></mo>
<mn>5</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>4</mn>
<mo>=</mo>
<mn>1.25</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r_{n}\leq 5/4=1.25}</annotation>
</semantics>
</math></span><img src="./c76a7adae592451ffaa5c406bd65baac19d4a54e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.086ex; height:2.843ex;" alt="{\displaystyle r_{n}\leq 5/4=1.25}" loading="lazy"></span>. <i>Proof</i>. Let <i>S</i>, <i>n</i> be a minimal (5/4)-counterexample. The above lemmas imply that -
</p>
<ul><li><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle s>{\frac {n}{n-1}}(5-4)>1}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>s</mi>
<mo>></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>n</mi>
<mrow>
<mi>n</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</mfrac>
</mrow>
<mo stretchy="false">(</mo>
<mn>5</mn>
<mo>−<!-- − --></mo>
<mn>4</mn>
<mo stretchy="false">)</mo>
<mo>></mo>
<mn>1</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle s>{\frac {n}{n-1}}(5-4)>1}</annotation>
</semantics>
</math></span><img src="./4df35a825c76900b0cd34d95afec890833b2ce62.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.005ex; width:21.658ex; height:4.843ex;" alt="{\displaystyle s>{\frac {n}{n-1}}(5-4)>1}" loading="lazy"></span>. Since the optimal capacity is 4, no optimal bin can contain 4 or more items. Therefore, each optimal bin must contain at most 3 items, and the number of items is at most 3<i>n</i>.</li>
<li>The size of each item is at most <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 4-2s}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>4</mn>
<mo>−<!-- − --></mo>
<mn>2</mn>
<mi>s</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 4-2s}</annotation>
</semantics>
</math></span><img src="./31ed2be1974c8b76aa901c43871c2be3a8ad9c60.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:6.256ex; height:2.343ex;" alt="{\displaystyle 4-2s}" loading="lazy"></span>, and the size of each FFD bin is more than <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 5-s}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>5</mn>
<mo>−<!-- − --></mo>
<mi>s</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 5-s}</annotation>
</semantics>
</math></span><img src="./7bd2f78b9266987320e6c4db49fe9526886c855a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:5.093ex; height:2.343ex;" alt="{\displaystyle 5-s}" loading="lazy"></span>. If some FFD bin contained only two items, its sum would be at most <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 8-4s=5+(3-3s)-s<5-s}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>8</mn>
<mo>−<!-- − --></mo>
<mn>4</mn>
<mi>s</mi>
<mo>=</mo>
<mn>5</mn>
<mo>+</mo>
<mo stretchy="false">(</mo>
<mn>3</mn>
<mo>−<!-- − --></mo>
<mn>3</mn>
<mi>s</mi>
<mo stretchy="false">)</mo>
<mo>−<!-- − --></mo>
<mi>s</mi>
<mo><</mo>
<mn>5</mn>
<mo>−<!-- − --></mo>
<mi>s</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 8-4s=5+(3-3s)-s<5-s}</annotation>
</semantics>
</math></span><img src="./721a86154b661c9cc4e3c618e189182a241531cd.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:33.545ex; height:2.843ex;" alt="{\displaystyle 8-4s=5+(3-3s)-s<5-s}" loading="lazy"></span>; so each FFD bin must contain at least 3 items. But this means that FFD yields exactly <i>n</i> bins - a contradiction.</li></ul>
<div class="mw-heading mw-heading3"><h3 id="Structure_of_FFD_packing">Structure of FFD packing</h3></div>
<p>To prove tighter bounds, one needs to take a closer look at the FFD packing of the minimal (<i>p</i>/<i>q</i>)-counterexample. The items and FFD bins P<sub>1</sub>,...,P<sub><i>n</i></sub> are termed as follows:
</p>
<ul><li>A <i>regular item</i> is an item added to some bin P<sub>i</sub>, before the next bin P<sub>i+1</sub> was opened. Equivalently, a regular item is an item in P<sub>i</sub> which is at least as large as every item in every bin P<sub>j</sub> for <i>j</i>><i>i</i>.</li>
<li>A <i>fallback item</i> is an item added to some bin P<sub>i</sub>, after the next bin P<sub>i+1</sub> was opened. Equivalently, a fallback item is an item in P<sub>i</sub> which is smaller than the largest item in P<sub>i+1</sub>.</li>
<li>A <i>regular k-bin</i> is a bin that contains <i>k</i> regular items and no fallback items.</li>
<li>A <i>fallback k-bin</i> is a bin that contains <i>k</i> regular items and some fallback items.</li></ul>
<p>The following lemmas follow immediately from these definitions and the operation of FFD.
</p>
<ul><li>If <i>k</i><sub>1</sub><<i>k</i><sub>2</sub>, then all <i>k</i><sub>1</sub>-bins are to the left of all <i>k</i><sub>2</sub>-bins. This is because all bins have the same capacity, so if more regular items fit into a bin, these items must be smaller, so they must be allocated later.</li>
<li>If P<sub>i</sub> is a <i>k</i>-bin, then the sum of the <i>k</i> regular items in P<sub>i</sub> is larger than <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {k}{k+1}}\cdot p}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>k</mi>
<mrow>
<mi>k</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</mfrac>
</mrow>
<mo>⋅<!-- ⋅ --></mo>
<mi>p</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\frac {k}{k+1}}\cdot p}</annotation>
</semantics>
</math></span><img src="./753605c5b66fa38a09e9baa9d0511b35e3941caa.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.171ex; width:8.899ex; height:5.676ex;" alt="{\displaystyle {\frac {k}{k+1}}\cdot p}" loading="lazy"></span>, since otherwise we could add another item before opening a new bin.</li>
<li>If P<sub>i</sub> and P<sub>i+1</sub> are both <i>k</i>-bins, and then the sum of the <i>k</i> regular items in P<sub>i</sub> is at least as large as in P<sub>i+1</sub> (this is because the items are ordered by decreasing size).</li>
<li>All regular <i>k</i>-bins are to the left of all fallback <i>k</i>-bins. This is because all bins have the same capacity, so if more fallback items fit into a bin, these items must be smaller, so they must be allocated later.</li></ul>
<p>In a minimal counterexample, there are no regular 1-bins (since each bin contains at least 2 items), so by the above lemmas, the FFD bins P<sub>1</sub>,...,P<sub><i>n</i></sub> are ordered by type:
</p>
<ul><li>Zero or more fallback 1-bins;</li>
<li>Then, zero or more regular 2-bins;</li>
<li>Then, zero or more fallback 2-bins;</li>
<li>Then, zero or more regular 3-bins;</li>
<li>Then, zero or more fallback 3-bins;</li>
<li>and so on.</li></ul>
<div class="mw-heading mw-heading3"><h3 id="1.22_upper_bound">1.22 upper bound</h3></div>
<p>The upper bound <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r_{n}\leq 1.22}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>≤<!-- ≤ --></mo>
<mn>1.22</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r_{n}\leq 1.22}</annotation>
</semantics>
</math></span><img src="./3892ce0464177882f588e73768da576340ce12b1.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:9.5ex; height:2.509ex;" alt="{\displaystyle r_{n}\leq 1.22}" loading="lazy"></span><sup id="cite_ref-:0_1-2" class="reference"><a href="#cite_note-:0-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> is proved by assuming a minimal (122/100)-counterexample. Each item is given a <i>weight</i> based on its size and its bin in the FFD packing. The weights are determined such that the total weight in each FFD bin is at least <i>x</i>, and the total weight in almost each optimal bin is at most <i>x</i> (for some predetermined <i>x</i>). This implies that the number of FFD bins is at most the number of optimal bins, which contradicts the assumption that it is a counterexample.
</p><p>By the lemmas above, we know that:
</p>
<ul><li>The size of the smallest item satisfies <i>s</i> > <i>p</i>-<i>q</i> = 22, so s = 22+<i>D</i> for some <i>D</i>>0.</li>
<li>Each optimal bin contains at most 4 items (floor(100/22)), and each FFD bin contains at most 5 items (floor(122/22)).</li>
<li>The size of every item is at most <i>q</i>-2<i>s</i> = 56-2<i>D</i>.</li>
<li>The sum in each FFD bin is larger than <i>p</i>-<i>s</i> = 100-<i>D</i>.</li>
<li>There are no 1-bins, since in a 1-bin, the size of the regular item must be at least <i>p</i>/2=61, while here the size of every item is less than 56.</li></ul>
<p>If <i>D</i>>4, the size of each item is larger than 26, so each optimal bin (with capacity 100) must contain at most 3 items. Each item is smaller than 56-2<i>D</i> and each FFD bin has a sum larger than 100-<i>D</i>, so each FFD bin must contain at least 3 items. Therefore, there are at most <i>n</i> FFD bins - contradiction. So from now on, we assume <i>D≤</i>4. The items are assigned types and weights as follows.
</p>
<ul><li>The two items in each regular 2-bin except maybe the last one have a size larger than (100-<i>D</i>)/2 each. All such items are called <i>type-X<sub>2</sub></i>, and assigned a weight of (100-<i>D</i>)/2. The last 2-regular bin is a special case: if both its items have a size larger than (100-<i>D</i>)/2, then they are <i>type-X<sub>2</sub></i> too; otherwise, they are called <i>type-Z</i>, and their weight equals their size.</li>
<li>The two regular items in each fallback 2-bin have a total size larger than 2*122/3; they are called <i>type-Y<sub>2</sub></i>, and their weight equals their size minus <i>D</i>.</li>
<li>The three items in each regular 3-bin except maybe the last one have a size larger than (100-<i>D</i>)/3 each. All such items are called <i>type-X<sub>3</sub></i>, and assigned a weight of (100-<i>D</i>)/3. The last 3-regular bin is a special case: if all items in it have a size larger than (100-<i>D</i>)/3, then they are <i>type-X<sub>3</sub></i> too; otherwise, they are called <i>type-Z</i> and their weight equals their size.</li>
<li>The three regular items in each fallback 3-bin have a total size larger than 3*122/4; they are called <i>type-Y<sub>3</sub></i>, and their weight equals their size minus <i>D</i>.</li>
<li>The four items in each regular 4-bin except maybe the last one have a size larger than (100-<i>D</i>)/4 each. All such items are called <i>type-X<sub>4</sub></i>, and assigned a weight of (100-<i>D</i>)/4. The last 4-regular bin is a special case: if all items in it have a size larger than (100-<i>D</i>)/4, then they are <i>type-X<sub>4</sub></i> too; otherwise, they are called <i>type-Z</i> and their weight equals their size.</li>
<li>The remaining items (including all fallback items in fallback 2-bins and 3-bins, all fallback 4-bins, and all other 5-item bins) are all called <i>type-X<sub>5</sub></i>, and their weight equals 22 (if <i>D</i> ≤ 12/5) or (100-<i>D</i>)/4 (otherwise). The threshold 12/5 was computed such that the weight is always at most 22+<i>D</i>, so that the weight is always smaller than the size.</li></ul>
<p>Note that the weight of each item is at most its size (the weight can be seen as the size "rounded down"). Still, the total weight of items in every FFD bin is at least 100-<i>D</i>:
</p>
<ul><li>For regular 2-bins, regular 3-bins and regular 4-bins:
<ul><li>For the non-last ones, this is immediate.</li>
<li>The last such bins contain only Z-type items, whose weight equals their size, so the total weight of these bins equals their total size, which is more than 100-<i>D</i>.</li></ul></li>
<li>Fallback 2-bins contain two type-Y<sub>2</sub> items with total weight larger than 2*122/3-2<i>D</i>, plus at least one type-X<sub>5</sub> item with weight at least 22 (if <i>D</i> ≤ 12/5) or (100-<i>D</i>)/4 (otherwise). In both cases the total weight is more than 100-<i>D</i>.</li>
<li>Fallback 3-bins contain three type-Y<sub>3</sub> items with total weight larger than 3*122/4-3<i>D</i>, plus at least one type-X<sub>5</sub> item with weight at least 22. So the total weight is more than 3*122/4+22-3<i>D</i> = 113.5-3<i>D</i> ≥ 105.5-<i>D</i> > 100-<i>D</i>, since <i>D≤</i>4.</li>
<li>5-item bins contain 5 items with size at least 22+<i>D</i> and weight at least 22, so their total weight is obviously more than 100-<i>D</i>.</li></ul>
<p>The total weight of items in most optimal bins is at most 100-<i>D</i>:
</p>
<ul><li>This is clear for any optimal bin containing a type<i>-Y<sub>2</sub></i> item or a type<i>-Y<sub>3</sub></i> item, since their weight is their size minus <i>D</i>, the weights of other items is at most their size, and the total size of an optimal bin is at most 100.</li>
<li>For optimal bins containing only type<i>-X<sub>2</sub></i>, type<i>-X<sub>3</sub></i>, type<i>-X<sub>4</sub></i> and type<i>-X<sub>5</sub></i> items, it is possible to check all possible configurations (all combinations that fit into an optimal bin of size 100), and verify that the total weight in each configuration is at most 100-<i>D</i>.</li>
<li>Optimal bins containing type-Z items might have a total weight larger than 100-<i>D</i>. Since the total weight is at most 100, there is an "excess weight" of at most <i>D</i> for each such bin. However, the number of type-Z items is limited:
<ul><li>If D > 12/5, then there are at most 5 type-Z items (2 in the last regular 2-bin and 3 in the last regular 3-bin; the items in the last regular 4-bin are all type-X<sub>4</sub>). Therefore, the excess weight is at most 5<i>D</i>. Comparing the total weight of FFD vs. optimal bins yields <i>s</i> < 5<i>D ≤</i> 20 < 22, a contradiction.</li>
<li>Otherwise, there are at most 9 type-Z items (2+3+4). Therefore, the excess weight is at most 9<i>D</i>. Comparing the total weight of FFD vs. optimal bins yields <i>s</i> < 9<i>D ≤</i> 108/5 < 22, a contradiction.</li></ul></li></ul>
<div class="mw-heading mw-heading3"><h3 id="13/11_upper_bound">13/11 upper bound</h3></div>
<p>The upper bound <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r_{n}\leq 13/11\approx 1.182}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>≤<!-- ≤ --></mo>
<mn>13</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>11</mn>
<mo>≈<!-- ≈ --></mo>
<mn>1.182</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r_{n}\leq 13/11\approx 1.182}</annotation>
</semantics>
</math></span><img src="./1b571af461a6a84f0783bdf5273987fe7f7f2066.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.573ex; height:2.843ex;" alt="{\displaystyle r_{n}\leq 13/11\approx 1.182}" loading="lazy"></span><sup id="cite_ref-:2_3-1" class="reference"><a href="#cite_note-:2-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> is proved by assuming a minimal ((120-3<i>d</i>)/100)-counterexample, with some <i>d<</i>20/33, and deriving a contradiction.
</p>
<div class="mw-heading mw-heading2"><h2 id="Non-monotonicity">Non-monotonicity</h2></div><p>
MultiFit is not <i>monotone</i> in the following sense: it is possible that an input <i>decreases</i> while the max-sum in the partition returned by MultiFit <i>increases</i>. As an example,<sup id="cite_ref-:0_1-3" class="reference"><a href="#cite_note-:0-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: Fig.4">: Fig.4 </span></sup> suppose <i>n</i>=3 and the input numbers are:</p><blockquote><p>44, 24, 24, 22, 21, 17, 8, 8, 6, 6.</p></blockquote><p>FFD packs these inputs into 3 bins of capacity 60 (which is optimal):
</p><ul><li>44, 8, 8;</li>
<li>24, 24, 6, 6;</li>
<li>22, 21, 17.</li></ul>
<p>But if the "17" becomes "16", then FFD with capacity 60 needs 4 bins:
</p>
<ul><li>44, 16;</li>
<li>24, 24, 8;</li>
<li>22, 21, 8, 6;</li>
<li>6.</li></ul>
<p>so MultiFit must increase the capacity, for example, to 62:
</p>
<ul><li>44, 16;</li>
<li>24, 24, 8, 6;</li>
<li>22, 21, 8, 6.</li></ul>
<p>This is in contrast to other number partitioning algorithms - <a href="List_scheduling" title="List scheduling">List scheduling</a> and <a href="Longest-processing-time-first_scheduling" title="Longest-processing-time-first scheduling">Longest-processing-time-first scheduling</a> - which are monotone.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Generalization:_fair_allocation_of_chores">Generalization: fair allocation of chores</h2></div>
<p>Multifit has been extended to the more general problem of <a href="Maximin-share" class="mw-redirect" title="Maximin-share">maximin-share</a> allocation of chores.<sup id="cite_ref-:3_5-1" class="reference"><a href="#cite_note-:3-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> In this problem, S is a set of chores, and there are <i>n</i> agents who assign potentially <i>different</i> valuations to the chores. The goal is to give to each agent, a set of chores worth at most <i>r</i> times the maximum value in an optimal scheduling based on <i>i</i>'s valuations. A naive approach is to let each agent in turn use the MultiFit algorithm to calculate the threshold, and then use the algorithm where each agent uses his own threshold. If this approach worked, we would get an approximation of 13/11. However, this approach fails due to the <a href="First-fit-decreasing_bin_packing#monotonicity" title="First-fit-decreasing bin packing">non-monotonicity of FFD</a>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Example">Example</h3></div>
<p>Here is an example.<sup id="cite_ref-:3_5-2" class="reference"><a href="#cite_note-:3-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: Ex.5.2">: Ex.5.2 </span></sup> Suppose there are four agents, and they have valuations of two types:
</p>
<table class="wikitable">
<tbody><tr>
<th>
</th>
<th>
</th>
<th>
</th>
<th>
</th>
<th>
</th>
<th>
</th>
<th>
</th>
<th>
</th>
<th>
</th>
<th>
</th>
<th>
</th>
<th>
</th>
<th>
</th>
<th>
</th>
<th>
</th>
<th>
</th>
<th>
</th>
<th>
</th></tr>
<tr>
<td>Type A:
</td>
<td>51
</td>
<td>27.5
</td>
<td>27.5
</td>
<td>27.5
</td>
<td>27.5
</td>
<td>25
</td>
<td>12
</td>
<td>12
</td>
<td>10
</td>
<td>10
</td>
<td>10
</td>
<td>10
</td>
<td>10
</td>
<td>10
</td>
<td>10
</td>
<td>10
</td>
<td>10
</td></tr>
<tr>
<td>Type B:
</td>
<td>51
</td>
<td>27.5
</td>
<td>27.5
</td>
<td>27.5
</td>
<td>27.5
</td>
<td>24
</td>
<td>20
</td>
<td>20
</td>
<td>8.33
</td>
<td>8.33
</td>
<td>8.33
</td>
<td>8.33
</td>
<td>8.33
</td>
<td>8.33
</td>
<td>8.33
</td>
<td>8.33
</td>
<td>8.33
</td></tr></tbody></table>
<p>Both types can partition the chores into 4 parts of total value 75. Type A:
</p>
<ul><li>51, 12, 12</li>
<li>27.5, 27.5, 10, 10</li>
<li>27.5, 27.5, 10, 10</li>
<li>25, 10, 10, 10, 10, 10</li></ul>
<p>Type B:
</p>
<ul><li>51, 24</li>
<li>27.5, 27.5, 20</li>
<li>27.5, 27.5, 20</li>
<li>8.33 {9 times}</li></ul>
<p>If all four agents are of the same, then FFD with threshold 75 fills the 4 optimal bins. But suppose there is one agent of type B, and the others are of type A. Then, in the first round, the agent of type B takes the bundle 51, 24 (the other agents cannot take it since for them the values are 51,25 whose sum is more than 75).In the following rounds, the following bundles are filled for the type A agents:
</p>
<ul><li>27.5, 27.5, 12 [the sum is 67 - there is no room for another 10]</li>
<li>27.5, 27.5, 12 [the sum is 67 - there is no room for another 10]</li>
<li>10, 10, 10, 10, 10, 10, 10 [the sum is 70 - there is no room for another 10]</li></ul>
<p>so the last two chores remain unallocated.
</p>
<div class="mw-heading mw-heading3"><h3 id="Optimal_value_guarantee">Optimal value guarantee</h3></div>
<p>Using a more sophisticated threshold calculation, it is possible to guarantee to each agent at most 11/9≈1.22 of his optimal value if the optimal value is known, and at most 5/4≈1.25 of his optimal value (using a polynomial time algorithm) if the optimal value is not known.<sup id="cite_ref-:3_5-3" class="reference"><a href="#cite_note-:3-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p><p>Using more elaborate arguments, it is possible to guarantee to each agent the same ratio of MultiFit.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Implementations">Implementations</h2></div>
<ul><li><b>Python:</b> The <a rel="nofollow" class="external text" href="https://github.com/erelsgl/prtpy">prtpy package</a> contains <a rel="nofollow" class="external text" href="https://github.com/erelsgl/prtpy/blob/main/prtpy/partitioning/multifit.py">an implementation of multifit</a>.</li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-:0-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-:0_1-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:0_1-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-:0_1-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-:0_1-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFCoffmanGareyJohnson1978" class="citation journal cs1">Coffman, Jr., E. G.; Garey, M. R.; Johnson, D. S. (1978-02-01). <span class="id-lock-subscription" title="Paid subscription required"><a rel="nofollow" class="external text" href="https://epubs.siam.org/doi/abs/10.1137/0207001">"An Application of Bin-Packing to Multiprocessor Scheduling"</a></span>. <i>SIAM Journal on Computing</i>. <b>7</b> (1): <span class="nowrap">1–</span>17. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1137%2F0207001">10.1137/0207001</a>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0097-5397">0097-5397</a>.</cite><span class="cs1-maint citation-comment"><code class="cs1-code">{{cite journal}}</code>: CS1 maint: multiple names: authors list (link)</span></span>
</li>
<li id="cite_note-:1-2"><span class="mw-cite-backlink">^ <a href="#cite_ref-:1_2-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:1_2-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-:1_2-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFFriesen1984" class="citation journal cs1">Friesen, Donald K. (1984-02-01). <span class="id-lock-subscription" title="Paid subscription required"><a rel="nofollow" class="external text" href="https://epubs.siam.org/doi/abs/10.1137/0213013">"Tighter Bounds for the Multifit Processor Scheduling Algorithm"</a></span>. <i>SIAM Journal on Computing</i>. <b>13</b> (1): <span class="nowrap">170–</span>181. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1137%2F0213013">10.1137/0213013</a>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0097-5397">0097-5397</a>.</cite></span>
</li>
<li id="cite_note-:2-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-:2_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:2_3-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFYue1990" class="citation journal cs1">Yue, Minyi (1990-12-01). <span class="id-lock-subscription" title="Paid subscription required"><a rel="nofollow" class="external text" href="https://doi.org/10.1007/BF02216826">"On the exact upper bound for the multifit processor scheduling algorithm"</a></span>. <i>Annals of Operations Research</i>. <b>24</b> (1): <span class="nowrap">233–</span>259. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2FBF02216826">10.1007/BF02216826</a>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/1572-9338">1572-9338</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:120965788">120965788</a>.</cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite id="CITEREFCao1995" class="citation cs2">Cao, Feng (1995), Du, Ding-Zhu; Pardalos, Panos M. (eds.), <span class="id-lock-subscription" title="Paid subscription required"><a rel="nofollow" class="external text" href="https://doi.org/10.1007/978-1-4613-3557-3_5">"Determining the Performance Ratio of Algorithm Multifit for Scheduling"</a></span>, <i>Minimax and Applications</i>, Nonconvex Optimization and Its Applications, vol. 4, Boston, MA: Springer US, pp. <span class="nowrap">79–</span>96, <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-1-4613-3557-3_5">10.1007/978-1-4613-3557-3_5</a>, <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-4613-3557-3</bdi><span class="reference-accessdate">, retrieved <span class="nowrap">2021-08-23</span></span></cite></span>
</li>
<li id="cite_note-:3-5"><span class="mw-cite-backlink">^ <a href="#cite_ref-:3_5-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:3_5-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-:3_5-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-:3_5-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFHuangLu2021" class="citation book cs1">Huang, Xin; Lu, Pinyan (2021-07-18). <a rel="nofollow" class="external text" href="https://doi.org/10.1145/3465456.3467555">"An Algorithmic Framework for Approximating Maximin Share Allocation of Chores"</a>. <i>Proceedings of the 22nd ACM Conference on Economics and Computation</i>. EC '21. New York, NY, USA: Association for Computing Machinery. pp. <span class="nowrap">630–</span>631. <a href="ArXiv_(identifier)" class="mw-redirect" title="ArXiv (identifier)">arXiv</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://arxiv.org/abs/1907.04505">1907.04505</a></span>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F3465456.3467555">10.1145/3465456.3467555</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-4503-8554-1</bdi>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:195874333">195874333</a>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite id="CITEREFBurkardHe1998" class="citation journal cs1">Burkard, R. E.; He, Y. (1998-09-01). <span class="id-lock-subscription" title="Paid subscription required"><a rel="nofollow" class="external text" href="https://doi.org/10.1007/BF02684354">"A note on MULTIFIT scheduling for uniform machines"</a></span>. <i>Computing</i>. <b>61</b> (3): <span class="nowrap">277–</span>283. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2FBF02684354">10.1007/BF02684354</a>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/1436-5057">1436-5057</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:37590584">37590584</a>.</cite></span>
</li>
<li id="cite_note-:4-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-:4_7-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFDeuermeyerFriesenLangston1982" class="citation journal cs1">Deuermeyer, Bryan L.; Friesen, Donald K.; Langston, Michael A. (June 1982). "Scheduling to Maximize the Minimum Processor Finish Time in a Multiprocessor System". <i>SIAM Journal on Algebraic and Discrete Methods</i>. <b>3</b> (2): <span class="nowrap">190–</span>196. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1137%2F0603019">10.1137/0603019</a>.</cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite id="CITEREFSegal-Halevi2021" class="citation cs2">Segal-Halevi, Erel (2021-10-17), <i>On Monotonicity of Number-Partitioning Algorithms</i>, <a href="ArXiv_(identifier)" class="mw-redirect" title="ArXiv (identifier)">arXiv</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://arxiv.org/abs/2110.08886">2110.08886</a></span></cite></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite id="CITEREFHuangSegal-Halevi2023" class="citation cs2">Huang, Xin; Segal-Halevi, Erel (2023-12-13), <i>A Reduction from Chores Allocation to Job Scheduling</i>, <a href="ArXiv_(identifier)" class="mw-redirect" title="ArXiv (identifier)">arXiv</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://arxiv.org/abs/2302.04581">2302.04581</a></span></cite></span>
</li>
</ol></div></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-05-23" href="https://en.wikipedia.org/wiki/?title=Multifit_algorithm&oldid=1291825897">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>